﻿using DAL;
using MODEL;

namespace BLL
{
    public class yingxiaoBLL
    {

        public yingxiaoBLL(yingxiaoDAL dal)
        {
            Dal = dal;
        }

        public yingxiaoDAL Dal { get; }

        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="biaoti">标题</param>
        /// <param name="count"></param>
        /// <param name="sum"></param>
        /// <param name="index">页码</param>
        /// <param name="size">页容量</param>
        /// <returns></returns>
        public List<yingxiao> Showying(string? biaoti, out int count, out int sum, int index = 1, int size = 2)
        {
            try
            {
                return Dal.Showying(biaoti,out count,out sum,index,size);

            }
            catch (Exception ex)
            {

                throw;
            }
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">返回受影响的行数</param>
        /// <returns></returns>
        public int Delying(int id)
        {
            try
            {
                return Dal.Delying(id);
            }
            catch (Exception ex)
            {

                throw;
            }
        }

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="yingxiao"></param>
        /// <returns></returns>
        public int Upying(yingxiao yingxiao)
        {
            try
            {
                return Dal.Upying(yingxiao);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <returns></returns>
        public yingxiao fantian()
        {
            try
            {
                return Dal.fantian();
            }
            catch (Exception)
            {

                throw;
            }
        }




    }
}
